package com.lihao.wanandroid.ui.navigation

import android.app.Application
import androidx.fragment.app.Fragment
import androidx.lifecycle.MutableLiveData
import com.lihao.jetpackcore.base.BaseViewModel
import com.lihao.jetpackcore.ext.request
import com.lihao.jetpackcore.state.ResultState
import com.lihao.wanandroid.data.AppRepository
import com.lihao.wanandroid.data.model.NavigationResponse

/**
 * Created by lihao on 2020/5/19.
 * Describe:
 */
class NavigationViewModel(application: Application) : BaseViewModel(application) {

    val naviLiveData: MutableLiveData<ResultState<ArrayList<NavigationResponse>>> =
        MutableLiveData()

    fun getNaviData() {
        request({ AppRepository.getNaviData() }, naviLiveData)
    }
}